home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.4d7 source / tn3270 / bgproc.a < prev    next >
Text File  |  1992-04-17  |  3KB  |  85 lines

  1.         case    yes
  2.         print    sym
  3.         
  4. ;
  5. ;  tn3270 for the Macintosh Source Code
  6. ;  Brown University Computing and Information Services
  7. ;  Version 2.4d7  April, 1992
  8. ;  Copyright (c) 1988, 1989, 1990, 1991, 1992 by Brown University and 
  9. ;  by Peter John DiCamillo.
  10. ;
  11. ;  Permission is granted to any individual or institution to use, copy,
  12. ;  or redistribute the binary version of this software and its
  13. ;  documentation provided this notice and the copyright notices are
  14. ;  retained.  Permission is granted to any individual or non-profit
  15. ;  institution to use, copy, modify, or redistribute the source files
  16. ;  of this software provided this notice and the copyright notices are
  17. ;  retained.  This software may not be distributed for profit, either
  18. ;  in original form or in derivative works, nor can the source be
  19. ;  distributed to other than an individual or a non-profit institution.
  20. ;  Any  individual or group interested in seeing and/or using these
  21. ;  source files but who are prevented from doing so by the above
  22. ;  constraints should contact Don Wolfe, Assistant Vice-President for
  23. ;  Computer Systems at Brown University, (401) 863-7250, for possible
  24. ;  software licensing of the source developed at Brown.
  25. ;
  26. ;  Brown University and Peter John DiCamillo make no representations
  27. ;  about the suitability of this software for any purpose.
  28. ;
  29. ;  BROWN UNIVERSITY AND PETER JOHN DICAMILLO GIVE NO WARRANTY, EITHER
  30. ;  EXPRESS OR IMPLIED, FOR THE PROGRAM AND/OR DOCUMENTATION PROVIDED,
  31. ;  INCLUDING, WITHOUT LIMITATION, WARRANTY OF MERCHANTABILITY AND
  32. ;  WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  33. ;
  34.  
  35.         import    sw_proc
  36.         import    sndend
  37.         import    nmend
  38.         export    bgproc
  39.         export    GetA5
  40.         export    sndproc
  41.         export    nmproc
  42.         
  43. saveregs    reg        a0-a6/d0-d7
  44.  
  45. bgproc    proc
  46.         movem.l    saveregs,-(sp)        ;save registers
  47.         move.l    (a1),a1                ;a1 = pcb handle
  48.         move.l    (a1),a1                ;a1 -> pcb
  49.         move.l    332(a1),a5            ;restore pointer to globals
  50.         jsr        sw_proc                ;call C processing code
  51.         movem.l (sp)+,saveregs        ;restore registers
  52.         rts
  53.         endproc
  54.  
  55. sndproc    proc
  56.         movem.l    saveregs,-(sp)        ;save registers
  57.         move.l    64(sp),a5            ;a5 -> SndCommand
  58.         move.l    4(a5),a5            ;restore pointer to globals
  59.         jsr        sndend                ;call C processing code
  60.         movem.l (sp)+,saveregs        ;restore registers
  61.         move.l    (sp),8(sp)            ;move return address
  62.         add.l    #8,sp                ;remove parameters from stack
  63.         rts                            ;return
  64.         endproc
  65.  
  66. nmproc    proc
  67.         movem.l    saveregs,-(sp)        ;save registers
  68.         move.l    64(sp),a5            ;a5 -> NMrec
  69.         move.l    32(a5),a5            ;restore pointer to globals
  70.         move.l    64(sp),-(sp)        ;push parameter
  71.         jsr        nmend                ;call C processing code
  72.         move.l    (sp)+,a5            ;pop parameter
  73.         movem.l (sp)+,saveregs        ;restore registers
  74.         move.l    (sp),4(sp)            ;move return address
  75.         add.l    #4,sp                ;remove parameter from stack
  76.         rts                            ;return
  77.         endproc
  78.  
  79. GetA5    proc
  80.         move.l    a5,d0                ; store old A5 as function result
  81.         rts
  82.         endproc
  83.         
  84.         end
  85.